package com.pubinfo.passbook.common.model.vo.mdm;

import com.alibaba.fastjson.JSONObject;
import com.pubinfo.passbook.common.model.vo.base.ResultCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.poi.ss.formula.functions.T;

@Data
@ApiModel(value = "返回")
public class MdmResult {
  private static final long serialVersionUID = -4138033536625725437L;
  /**
   * 状态码
   */
  @ApiModelProperty(value = "状态码")
  private String status = "S";//1 表示ok,0表示error
  /**
   * 状态码对应的消息
   */
  @ApiModelProperty(value = "消息")
  private String message = "成功";
  
  public MdmResult(String status, String message) {
    this.status = status;
    this.message = message;
  }
  
  public MdmResult() {
  }
  
  public static String error(String message) {
    return JSONObject.toJSONString(new MdmResult("E", message));
  }
  
  public static String success() {
    
    return JSONObject.toJSONString(new MdmResult());
    
  }
}
